﻿using DataModels.Enums.Home;
using SqlSugar;
using static DataModels.Enums.GeneralEnum;

namespace DataModels.Entities.HomeService
{
    [SugarTable]
    public class HomeServiceOrderComment
    {
        [SugarColumn(IsPrimaryKey = true)]
        public Guid UUID { get; set; } = Guid.NewGuid();

        /// <summary>
        /// 关联的订单的ID
        /// </summary>
        public Guid OrderUUID { get; set; }

        /// <summary>
        /// 关联的商品ID
        /// </summary>
        public Guid ProductUUID { get; set; }

        /// <summary>
        /// 评论用户ID
        /// </summary>
        public Guid UserUUID { get; set; }

        /// <summary>
        /// 星级评分（1-5分）
        /// </summary>
        public StarRating StarRating { get; set; } = StarRating.FiveStars;

        /// <summary>
        /// 评论用户名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 评论内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 评论时间
        /// </summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 父评论ID（用于评论回复，一级评论为null）
        /// </summary>
        //public Guid? ParentCommentUUID { get; set; }

        /// <summary>
        /// 删除状态
        /// </summary>
        public Status IsDeleted { get; set; } = Status.Disable;
    }
}
